/**
 * This file is part of the dspace-poltman project http://www.poltman.com.
 *
 * This is free software; you can redistribute it and/or modify it under
 * the terms of DuraSpace DSpace license detailed in the LICENSE and NOTICE 
 * files at the root of the source tree and available online at
 * http://www.dspace.org/license/
 * 
 */

package com.poltman.dscentral.communities;

import org.apache.log4j.Logger;
import org.zkforge.ckez.CKeditor;
import org.zkoss.zk.ui.select.SelectorComposer;
import org.zkoss.zk.ui.select.annotation.Listen;
import org.zkoss.zk.ui.select.annotation.Wire;
import org.zkoss.zul.Messagebox;


/**
 * 
 * @author z.ciok@poltman.com
 *
 */
public class SaveCommunitySideBarText extends SelectorComposer<CKeditor>  {

	private static final long serialVersionUID = -1936185675744806352L;

	private static Logger log = Logger.getLogger(SaveCommunitySideBarText.class);
	
	@Wire("ckeditor")
	CKeditor edSideBarText;
	
	/**
	 * 
	 */
	@Listen("onSave = ckeditor#edSideBarText")
	public void saveSideBarText() {
		log.info("SIDE BAR TEXT....." + edSideBarText.getValue());
		
		//TODO: i18n
		Messagebox.show("Side Bar Text has been saved...", "DSCentral", 0,  Messagebox.INFORMATION);
	}	
}
